<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>Thống kê khảo sát</title>
	
	<!-- Load main style css -->
	<%@ include file="../include-file/main-style.jsp" %>
	
</head>
<body>
	<div class="main-content">
		<!-- Menu bar -->
		<%@ include file="../include-file/header-menu.jsp" %>
		
		<div class="body-content">
			<div class="top-right-button">
				<a href="./camp-detail?campId=${model.campaign.campId }" class="btn btn-primary"><div class="button-box">Danh sách khảo sát</div></a>
				<br>
				<br>
				
			</div>
			<div class="title-text">
				<h3>${model.survey.name}</h3>
			</div>
			<div class="list-item">
				Kết quả khảo sát 
				<br>
				<c:set var="answerIndex" scope="session" value="1"/>
				<c:forEach var="questAnsList" items="${model.listQuestAnsList}">
					${questAnsList.question.questContent}
					<br>
					<ul>
						<c:forEach var="answer" items="${questAnsList.answerList}">
							<li>${answer.answerContent}
							<br>
							Số lượng <span class="btn btn-danger">${model.map[answer.answerContent] }</span>
							Tỉ lệ: <span class="btn btn-success">${model.map2[answer.answerContent] }%</span>
							<progress class="progess-answer" value="${model.map2[answer.answerContent] }" max="100"></progress>
							</li>
						</c:forEach>
					</ul>
					<br>
				</c:forEach>
			</div>
		</div>
	</div>
	
	<%@ include file="../include-file/footer-script.jsp" %>
	
</body>
</html>